<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		canvas{
			border: 1px solid #000;
		}
	</style>
</head>
<body>
	<canvas id="canvas" width="800" height="500">你的浏览器不支持canvas</canvas>
	<script type="text/javascript">
		//得到标签
		var canvas = document.getElementById("canvas");
		//上下文
		var ctx = canvas.getContext("2d");
		
		//画一个弧
		for(var i = 50 ; i < 300 ; i+= 20){
			//开始一个路径
			ctx.beginPath();
			ctx.arc(200,200,i,0, Math.PI * 2,false);
			//封闭路径
			ctx.closePath();
			//描边
			ctx.stroke();
		}
		
	</script>
</body>
</html>